Skip to content

refactor(dispatch): deliver tasks through Git worktrees - #1947

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:refactor/dispatch-git-worktree-baseline
Aug 1, 2026
Merged

refactor(dispatch): deliver tasks through Git worktrees#1947
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:refactor/dispatch-git-worktree-baseline

Conversation

@bobleer

@bobleer bobleer commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Show Dispatch only for Git workspaces, matching the worktree control visibility.
  • Replace snapshot delivery with claimed controller baseline worktrees and isolated target-side Git worktrees.
  • Provision missing Git objects through verified bundles and sync target commits back into the managed baseline with one action.
  • Add protocol v3 workspace operations for SSH and account-device relay targets, including automatic verified SSH CLI setup and audit events.
  • Make Dispatch sync retryable and idempotent, and restore observer transcripts, terminal timing, and cursor state correctly after controller restarts.
  • Improve target loading, setup and sync messaging, and SSH connection-dialog behavior found during end-to-end testing.

Fixes: N/A

Type and Areas

Type: Refactor, feature, bug fix, UI/UX, documentation, tests

Areas: Rust core and services, CLI, desktop/Tauri, server/relay, Web UI, i18n, architecture docs

Motivation / Impact

Dispatch jobs now execute in isolated Git worktrees instead of copied snapshots. The controller keeps a claimed baseline worktree, target changes return as a verified Git bundle, and the user can synchronize them without mutating the original source checkout. The same contract is shared by SSH and account-device targets.

Compatibility

  • Dispatch protocol v3 is intentionally incompatible with older target CLIs.
  • SSH targets self-heal through verified CLI installation; account devices must run a compatible BitFun version.
  • The first compatible signed stable CLI is pinned to 0.2.16. The real E2E run used a current-source Linux CLI because published 0.2.15 still implements protocol v2.
  • Ignored files are not transferred; delivery is based on Git-visible workspace state.

Verification

  • pnpm run type-check:web
  • Focused Web UI suite: 16 files, 212 tests passed
  • cargo check --workspace
  • cargo test -p bitfun-cli workspace: 25 passed
  • pnpm run i18n:audit: 0 warnings
  • pnpm run fmt:rs
  • git diff --check
  • Real dev-desktop to SSH flow using pnpm run desktop:dev: target setup, dispatch execution, exact output, and initial bundle sync
  • Repeated no-op sync, failed-operation retry, and three cold-start transcript recovery checks
  • Confirmed controller baseline and remote worktree stayed clean at the same branch/head, and the user source checkout remained untouched

Reviewer Notes

  • AI-assisted implementation; automated checks and the real cross-machine workflow were both completed.
  • Manual UX verification used only the development desktop process, not the installed release application.
  • The legacy snapshot result-apply path and its tar/flate dependencies are intentionally removed.

Checklist

  • The change is focused and contains no secrets or local test artifacts.
  • Focused frontend, Rust, i18n, formatting, and end-to-end verification are recorded above.
  • New user-visible strings are localized in en-US, zh-CN, and zh-TW.
  • Architecture and feature documentation are updated for the protocol and delivery-model change.

@bobleer
bobleer merged commit 91bdf7f into GCWing:main Aug 1, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant